#!/usr/bin/env python
#coding: utf-8
'''
Created on 2017年2月22日

@author: Administrator
'''
from django.conf import settings
from common import settings as common_settings


LOGIN_URL = settings.LOGIN_URL
STATIC_URL = settings.STATIC_URL
LOGIN_SUCESS_URL = settings.LOGIN_SUCESS_URL
SESSION_COOKIE_DOMAIN = settings.SESSION_COOKIE_DOMAIN

USERINFO_COOKIE_NAME = common_settings.USERINFO_COOKIE_NAME

#默认用户头像
DEFAULT_AVATAR_FPATH = ""

# 用户类型
class UserTypeEnum:
    DEFAULT = 0     # 普通用户
    
USER_TYPE_CHOICES = (
    (UserTypeEnum.DEFAULT, u'普通用户'),
)

# 性别
class UserSexEnum:
    UNKOWN = 'N'
    MALE = 'M'
    FEMALE = 'F'
    
USER_SEX_CHOICES = (
    (UserSexEnum.MALE, u"男"),
    (UserSexEnum.FEMALE, u"女"),
    (UserSexEnum.UNKOWN, u'保密')
)



# 错误码分配
ERROR = {
    'PASSWORD_ERR': {'code': '11002', 'msg': u'密码错误'},
    'NOT_LOGIN_ERR': {'code': '62001', 'msg': u'你还没有登录，请先登录'},
    'IDCARD_VALIDATE_ERR': {'code': '62002', 'msg': u'身份认证失败'},
    'AUTH_ERR': {'code': '62003', 'msg': u'用户名或密码错误'},
    'USERNAME_FORMAT_ERR': {'code': '11020', 'msg': u'不是合法的手机或邮箱'}
}
ERROR.update(settings.ERROR)
